home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 5
/
Amiga Tools 5.iso
/
tools
/
developer-tools
/
andere sprachen
/
perl5
/
perl5.002
/
mv-if-diff
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1994-10-18
|
303 b
|
15 lines
: mv-if-diff file1 file2
: move file1 to file2 if file1 and file2 are different.
if test $# -lt 2 ; then
echo "usage: $0 file1 file2"
echo "move file1 to file2 if file1 and file2 are different."
exit 1
fi
if cmp $1 $2 >/dev/null 2>&1; then
echo "File $2 not changed."
rm -f tmp
else
mv $1 $2
fi